﻿using System;
using System.ComponentModel.Composition;
using System.Collections.Generic;

namespace GenY {
  [Serializable]
  public class GenyResult {
    public String Report { get; set; }
    public GenyRatedFile[] Files { get; set; }
  }

  [Serializable]
  public class GenyRatedFile {
    public string FileName { get; set; }
    public byte[] Contents { get; set; }
    public Dictionary<String,Object> Properties { get; set; }
  }

  public interface IGenYrator {
    GenyResult GenYrate( string filename, string file, string language, string[ ] references );
  }

  [MetadataAttribute]
  [AttributeUsage( AttributeTargets.Class )]
  public class GenYratorAttribute : ExportAttribute {
    public String Extension { get; set; }

    public GenYratorAttribute( string Extension )
      : base( typeof( IGenYrator ) ) {
      this.Extension = Extension;
    }
  }

}

namespace GenY.Internal {
  public interface IGenYMetadata {
    String Extension { get; }
  }
}